<?php

    session_start();

    if (!isset($_SESSION['is_logged_in']) && !$_SESSION['is_logged_in']) {
        header('Location: login.php');
    }

?>
<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>BTIDUG | GER</title>

    <!-- Bootstrap Core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->
    <link href="css/plugins/metisMenu/metisMenu.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="css/sb-admin-2.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="font-awesome-4.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="css/plugins/datepicker/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css">
    <link href="css/app.css" rel="stylesheet">

    <link rel="shortcut icon" type="image/png" href="images/btlogo.png"/>

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>

    <div id="wrapper">

        <!-- Navigation -->
        <nav class="navbar navbar-default navbar-static-top bg-primary" role="navigation" style="margin-bottom: 0">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
            <a class="navbar-brand" href="index.php" style="font-family:optimum; font-size:200%"><img src="images/btlogo.png">Guest Experience Report</a>
            </div>
            <!-- /.navbar-header -->

            <!-- <a href="login_act.php?act=2" class="btn btn-danger btn-sm pull-right">Log Out</a> -->

            <ul class="nav navbar-top-links navbar-right">
                <li>
                    <br>
                    <span style="font-size:14px"><a class="fa fa-user">  <?php echo $_SESSION['fullname'] ?></a><a href="login_act.php?act=2" class="fa fa-sign-out" type="text" style="align-items:centre">Log Out</a></span>
                </li>
            </ul>
            <!-- /.navbar-top-links -->

            <div class="navbar-default sidebar" role="navigation">
                <div class="sidebar-nav navbar-collapse">
                    <ul class="nav" id="side-menu">
                        <li class="sidebar-search">
                        	<form action="complaint_search_results.php" method="GET" role="form">
                        		<div class="input-group custom-search-form">
	                                <input type="text" name="keyword" class="form-control" placeholder="Search by issue..">
	                                <span class="input-group-btn">
		                                <button class="btn btn-default" type="submit">
		                                    <i class="fa fa-search"></i>
		                                </button>
		                            </span>
	                            </div>
                        	</form>
                            
                            <!-- /input-group -->
                        </li>
                        <li>
                            <a href="complaint_new.php" class="#bg-primary"><i class="fa fa-bars" style="font-size:15px"></i> <span style="font-family:optimum;font-size:15px">Create New GER</span></a>
                            <?php if ($_SESSION['user_type'] == 0): ?>    
                            <a href="categories.php" class="#bg-primary"><i class="fa fa-bars" style="font-size:15px"></i> <span style="font-family:optimum;font-size:15px">Edit Categories</span></a>
                            <?php endif ?>
                           
                        </li>
                        <li>
                            <a href="#" style="font-family:optimum;font-size:15px"><i class="fa fa-bars fa-fw"></i> GERs<span class="fa arrow"></span></a>
                            <ul class="nav nav-second-level">
                                <li>
                                    <a href="complaints.php" class="#bg-primary"><i class="fa fa-bars" style="font-size:15px"></i> <span style="font-family:optimum;font-size:15px">Unresolved GERs</span></a>
                                </li>
                                <li>
                                    <a href="complaints_closed.php" class="#bg-primary"><i class="fa fa-bars" style="font-size:15px"></i> <span style="font-family:optimum;font-size:15px">Resolved GERs</span></a>
                                </li>
                                <li>
                                    <a href="complaint_all.php" class="#bg-primary"><i class="fa fa-bars" style="font-size:15px"></i> <span style="font-family:optimum;font-size:15px">All GERs</span></a>
                                </li>
                                <li>
                                    <?php if ($_SESSION['user_type'] == 3): ?>    
                                    <a href="gscreport.php" target="_blank" class="#bg-primary"><i class="fa fa-bars" style="font-size:15px"></i> <span style="font-family:optimum;font-size:15px">Report</span></a>
                                    <?php endif ?>
                                </li>
                            </ul>
                        </li>
                        <!-- <li>
                            <a href="#"><i class="fa fa-bar-chart-o fa-fw"></i> Charts<span class="fa arrow"></span></a>
                            <ul class="nav nav-second-level">
                                <li>
                                    <a href="flot.html">Flot Charts</a>
                                </li>
                                <li>
                                    <a href="morris.html">Morris.js Charts</a>
                                </li>
                            </ul>
                            <!-- /.nav-second-level -->
                        </li> -->                     
                    </ul>
                </div>
                <!-- /.sidebar-collapse -->
            </div>
            <!-- /.navbar-static-side -->
        </nav>


        <div id="page-wrapper">
<script src="js/bootstrap.min.js"></script>